from base import Base
from selenium.webdriver.common.by import By
from time import sleep

class SouSuoPage(Base):
    sousuokuang=(By.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.FrameLayout[2]/android.widget.RelativeLayout/android.widget.RelativeLayout[1]/android.widget.LinearLayout[1]/android.widget.TextView')
    shurukuang=(By.ID,'com.kongfz.app:id/etContent')
    sousuoanniu=(By.ID,'com.kongfz.app:id/tvSearch')

    dy=(By.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.view.ViewGroup/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.RelativeLayout/android.widget.LinearLayout/android.widget.TextView')

    def sousuoyewu(self,neirong):
        self.find_ele(self.sousuokuang).click()
        sleep(3)
        self.find_ele(self.shurukuang).send_keys(neirong)
        sleep(3)
        self.find_ele(self.sousuoanniu).click()
        sleep(3)
